import request from '@/utils/request'
import qs from 'qs';

const baseUrl = "http://localhost:8080/api";

// 获取资讯
export function getNews() {
    return request({
        url: `${baseUrl}/getNew`,
        method: 'post',

    })
}

// 添加资讯
export function addNews(data) {
    return request({
        url: `${baseUrl}/addnew`,
        method: 'post',
        data: qs.stringify(data)
    })
}

// 删除资讯
export function deleteNews(data) {
    return request({
        url: `${baseUrl}/deletenew`,
        method: 'post',
        data: qs.stringify(data)
    })
}